<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script type="text/javascript">
    //有一个包含工资的数组[1500, 1200, 2000, 2100, 1800]，要求把数组中工资超多2000的删除，剩余的放到新数组里面。
    let arr = ['1500', '1200', '2000', '2100', '1800'];
	let arr2 = [];
    for(let i = 0;i <= arr.length;i++){
        
        if(arr[i] <= 2000){
            arr2.push(arr[i]);
			
        }
    }
    console.log(arr2);
    </script>
</body>
</html>